﻿{% extends 'base.html' %}
{% block title %}
<title>Admin</title>
{% endblock %}
{% block contents %}
<div id="main">
    <div id="items">
        <table id="item-list" cellspacing="0" style="border-collapse:collapse">
            <thead>
                <tr>
                    <th>title</th>
                    <th>identity</th>
                    <th>category</th>
                    <th>quantity</th>
                    <th>number</th>
                    <th>Del</th>
                    <th>Edit</th>
                </tr>
            </thead>
            <tbody>
            {% for item in items %}
                <tr class="{% cycle odd,even %}">
                    <td>{{ item.title }}</td>
                    <td>{{ item.identity }}</td>
                    <td>{{ item.category }}</td>
                    <td>{{ item.quantity }}</td>
                    <td>{{ item.number }}</td>
                    <td><a href="/admin/del/{{ item.get_id }}">Del</a></td>
                    <td><a href="/admin/edit/{{ item.get_id }}">Edit</a></td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
    </div>
</div>
{% endblock %}